-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add buildScript option #504
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
c3fa364
to
1d91137
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left inline comment and question.
await buildProcess; | ||
|
||
if (!apkPath || fs.existsSync(apkPath)) { | ||
throw new Error("Build script didn't output any app path"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments inline
7ec0514
to
06e349c
Compare
Build works correctly, app crashes when launched. Need to investigate. |
d4fe832
to
3c9d749
Compare
): Promise<string> { | ||
const { stdout, lastLine: binaryPath } = await runExternalScript(cancelToken, externalCommand); | ||
|
||
let easBinaryPath = await downloadAppFromEas(stdout, platform, cancelToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this code is generic and not specific to EAS, why we use EAS in the method name then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is specific to EAS, we assume certain JSON structure.
const installApk = (allowDowngrade: boolean) => | ||
exec( | ||
ADB_PATH, | ||
["-s", this.serial!, "install", ...(allowDowngrade ? ["-d"] : []), "-r", build.apkPath], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason why we can't just always "allow downgrade" ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adb
only allows downgrading debuggable packages. If we assume that every app we install is debuggable then we can always do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good point. I think it's ok to assume process is debuggable unless it's expo go
11e5395
to
e2642ab
Compare
07a99c4
to
d4a7c56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge it as is. Would be great to do a quick follow up to add better caching, specifically for the eas builds. Now every fingerprint change will result in us downloading the same EAS build while as long as build ID stays the same, there's no reason to download the file again
Adds new configuration options to launch config:
buildScript
– replacing default build process with any script that outputs built app's path as last line of standard output (e.g. fetching app binary from the internet or using built app from local fs). It's an object withios
andandroid
string keys.eas
– replacing default build process with fetching app from EAS build service. It's an object withprofile
,useBuildType
, andbuildUUID
keys.profile
is used to select correct build profile fromeas.json
,useBuildType
is either"latest"
or"id"
used to select either latest suitable build or selecting build via build UUID.buildUUID
is required when usinguseBuildType: "id"
.You can't specify both
eas
andbuildScript
for one platform.Test plan
buildScript
– simple"echo SOME_PATH"
script for both platforms.eas
– tested both platforms, for "latest" and "id" strategies.Followups
Resolves #150.